Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[phi decoupling] move sequence_padding from fluid to phi #50639

Merged
merged 12 commits into from
Feb 21, 2023

Conversation

huangjiyi
Copy link
Member

PR types

Others

PR changes

Others

Describe

  • move sequence_padding from fluid to phi

@paddle-bot
Copy link

paddle-bot bot commented Feb 18, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@@ -193,16 +191,16 @@ class UnpaddingLoDTensorFunctor<phi::CPUContext, T> {

#ifdef PADDLE_WITH_XPU
template <typename T>
class UnpaddingLoDTensorFunctor<platform::XPUDeviceContext, T> {
class UnpaddingLoDTensorFunctor<paddle::platform::XPUDeviceContext, T> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XPUDeviceContext替换成phi下的XPUContext

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已处理

@@ -32,63 +34,62 @@ void TestSequencePadding(const DeviceContext &context,
static_cast<int64_t>(sequence_width)});

cpu_seq.set_lod(lod);
cpu_seq.mutable_data<T>(seq_dims, paddle::platform::CPUPlace());
auto *dev_ctx = static_cast<phi::CPUContext *>(
paddle::platform::DeviceContextPool::Instance().Get(phi::CPUPlace()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不需要使用从全局单例里拿对象,可以试试参数传入的context行不行

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个改成参数传入的 context 之后 CI-Windows 上的 sequence_padding 单测没办通过,我也不太清楚原因:cry:

@YuanRisheng YuanRisheng merged commit 5f44360 into PaddlePaddle:develop Feb 21, 2023
@huangjiyi huangjiyi deleted the decouple_sequence_padding branch March 8, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants